package com.robcity.platform.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description
 * @Author zhangsong
 * @Date 2024/8/10
 **/
@Getter
@AllArgsConstructor
public enum RobotEventHandelStatus {
    HANDLED("1", "持续"),
    UNHANDLED("2", "已关闭");

    private final String code;
    private final String desc;

    public static RobotEventHandelStatus getByCode(String code) {
        for (RobotEventHandelStatus value : RobotEventHandelStatus.values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
